class kmeans
{
  public:
    
    
    // class constructor  (there can be more than one, as long as each has a different number of arguments, or argument types)
    inline 		kmeans(const mat &in_data, const uword in_Ncent);
    
    inline void 	run(const uword N_iter);
    
    inline void		print_labels(const field<std::string>  labels);
    inline uvec		get_id_summ();
    inline umat		get_partitions();
    inline uvec		near_points() ;
    
  private:
    
    // variables that are not accessible outside of the kmeans class
    
    const mat& 			data;
    const uword 		N_cent;
    const uword			Dim;
    const uword			N_data;
    
    umat partitions;
    umat partitions2; // 

    mat cent_1;
    mat cent_2;
    vec distances;
    uvec counts;
    uvec counts2;

    double err;
    uword best_ci;
    mat means;
    //mat covs;     // this does not have to be declared: it can be calculated inside get_covs()
    vec weights;
    double distortion; // Nov15,2013 
    mat Points_cent; // Nov15,2013 
    
    inline void 	ini_cent();
    inline void 	update_cent();
   

   
};
